﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CompanyBussiness
{
    interface IAccountManagement
    {
        string LoginUser(string userName,string password);
        bool CheckPermissionOfAccount(Account acc);
        Account GetAccountByUserName(string userName);
        void LogOut();
        string ForgotPassword(string userName, string email);

        void CreateUser(string userName, string password, string fName, string lName, string email, string nick, string address, string phone, Boolean gender, string images);
        void ChangePassword(string userName, string password);
        void DeleteAccount(int AccountID);
        void UpdateAccount(int accountID, string userName, string password, string fName, string lName, string email, string nick, string address, string phone, Boolean gender, string images, Boolean roles);

        AccountLog GetSystemLog(int accountID);
        VwLogUser GetLogByUserName(string userName);
        string GetSystemLogAll();
        VwLogUser GetLastLog(string userName);
        void CreateLog(DateTime accountLogTime, string accountLogDetail, string IPAddress, int accountID);
        void UpdateLog(int accountLogID, string accountLogDetail, int accountID);

        void CreateInternalUser(InternalUser internerUser);
        Modul GetModulByModulCode(string modulCode);
        InternalUser GetInternalByUserName(string userName);
        void SetPermission(InternalUser internerUser,Modul modul);
        void ActiveAccount(Account account);

        int GetAccountIDByInternalUserID(int internalID);

        List<VwInternalUser> GetAccountInternalSearch(VwInternalUser vw, DateTime DateForm, DateTime DateTo, int take, int StartRow);
        int GetNumberInternalSearch(VwInternalUser vw, DateTime DateForm, DateTime DateTo);

        List<VwPermissionUser> GetPermissionUserByAccountID(int accountID);
        Modul GetModulByID(int modulID);
        VwInternalUser GetViewInternalUserByAccountID(int accountID);
        int CheckEmail(string email);
        void UpdateInternalUserByAccoutID(int accountID, string email, string fullName, string address, string phone);
        int CreateAccount(Account acc);
        List<Modul> GetListModul();
        int GetPermissionByAllID(InternalUser internerUser, Modul modul);
        void DeletePermissionByAllID(InternalUser internerUser, Modul modul);
    }
}
